﻿using LD.BC;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace LD.Host.项目
{
    public partial class CtlIO : UserControl
    {
        public CtlIO()
        {
            InitializeComponent();

            pic_signal.Image = this.imageList2.Images[0];
        }
        private ScrewEnum _levelType;
        public ScrewEnum LevelType
        {
            get { return _levelType; }
            set
            {
                _levelType = value;

                switch (_levelType)
                {
                    case ScrewEnum.Start:
                        pic_signal.Image = this.imageList2.Images[0];
                        break;
                    case ScrewEnum.Testing:
                        pic_signal.Image = this.imageList2.Images[1];
                        break;
                    case ScrewEnum.Complated:
                        pic_signal.Image = this.imageList2.Images[1];
                        break;
                    case ScrewEnum.Error:
                        pic_signal.Image = this.imageList2.Images[2];
                        break;
                    default:
                        break;
                }
            }
        }
        public int _num = 1;
        public int Num
        {
            get
            {
                return _num;
            }
            set
            {
                _num = value;
                this.lab_num.Text = _num + "";
            }
        }
    }
}
